package com.lvmama.rhino.service.impl;

import java.util.Date;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.lvmama.rhino.entity.PieRobot;
import com.lvmama.rhino.mongo.RhinoRound;
import com.lvmama.rhino.mongo.RhinoTalk;
import com.lvmama.rhino.repositories.RhinoRepository;
import com.lvmama.rhino.service.MongoService;


/**
* @ClassName: MongoServiceImpl 
* @Description: 从mongodb中查询客服机器人命中率
* @author yecan
* @date 2016年9月5日 上午9:49:43
 */
@Service
public class MongoServiceImpl implements MongoService {

	@Autowired
	private RhinoRepository rhinoRepository;
	@Override
	public List<RhinoRound> queryByPage(Integer page,Integer pageSize){
		return rhinoRepository.queryByPage(page,pageSize);
	}
	
	
	@Override
	public Long queryCount() {
		return rhinoRepository.queryCount();
	}

	/**
	 * 按条件分页查询
	 */
	@Override
	public List<RhinoRound> ajaxByPage(Integer page, Date startTime,
			Date endTime, String isMatch,String source) {
		return rhinoRepository.ajaxByPage(page,startTime,endTime,isMatch,source);
	}


	
	@Override
	public Long queryAjaxCount(Date startTime, Date endTime, String isMatch,String source) {
		return rhinoRepository.queryAjaxCount(startTime, endTime,isMatch,source);
	}



	@Override
	public List<PieRobot> ajaxPie(Date startDate, Date endDate) {
		return rhinoRepository.ajaxPie(startDate,endDate);
	}



	@Override
	public List<RhinoRound> exportMongoData(String isMatch, Date startDate,
			Date endDate,String source) {
		return rhinoRepository.exportMongoData(isMatch,startDate,endDate,source);
	}


	
	@Override
	public Long queryTalkCount(String str,Date startDate, Date endDate,String source) {
		// TODO Auto-generated method stub
		return rhinoRepository.queryTalkCount(str,startDate,endDate,source);
	}


	

	@Override
	public List<RhinoRound> queryBySessionId(Integer page, String sessionId) {
		// TODO Auto-generated method stub
		return rhinoRepository.queryBySessionId(page,sessionId);
	}


	
	@Override
	public Long queryCountBySessionId(String sessionId) {
		return rhinoRepository.queryCountBySessionId(sessionId);
	}


	
	@Override
	public List<RhinoTalk> findSatisfactionData(String string, String string2,
			Date startDate, Date endDate,String source) {
		// TODO Auto-generated method stub
		return rhinoRepository.findSatisfactionData(string,string2,startDate, endDate,source);
	}



	@Override
	public List<PieRobot> ajaxSatisfactionPie(Date startDate, Date endDate) {
		// TODO Auto-generated method stub
		return rhinoRepository.ajaxSatisfactionPie(startDate,endDate);
	}


	@Override
	public RhinoTalk queryTalkBySessionId(String sessionId) {
		// TODO Auto-generated method stub
		return rhinoRepository.queryTalkBySessionId(sessionId);
	}




	

	
	
}
